import 'package:flutter/material.dart';

/*
* container
*   装饰器
* */
class ContainerDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      alignment: Alignment(1, 0),

      width: 100,
      height: 100,
      // color: Colors.green,
      child: Icon(Icons.games),
      decoration: BoxDecoration(
        color: Colors.green,
        border: Border.fromBorderSide(BorderSide(width: 1)),
        boxShadow: [
          BoxShadow(
            color: Color.fromRGBO(123, 234, 1, 0.5),
            offset: Offset(0, 9),
            spreadRadius: 10,
            blurRadius: 3
          ),

        ],
        shape: BoxShape.circle,
        gradient: LinearGradient(colors: [
          Colors.black12,
          Colors.green,
          Colors.lime
        ],
          begin: AlignmentGeometry.bottomLeft,
          end: AlignmentGeometry.topRight
        ),
        image:DecorationImage(image: NetworkImage("https://inews.gtimg.com/news_bt/OBkbmPLeWLy4IM4oUDGvOIqSDSZ9lYOtW3qSXCYh78KXcAA/1000"),fit: BoxFit.cover)
      ),
    );
  }
}
